package com.training1.core.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.ibatis.type.Alias;

import com.training1.core.common.entity.DataEntity;

@Alias("Income")
public class IncomeEntity extends DataEntity{

	private static final long serialVersionUID = -8905184783809415670L;
	
	private Integer id;
	
	private String orderNumber;
	
	private int incomeType;
	
	private int paymentType;
	
	private int paymentChannel;
	
	private double cash;
	
	private String cellphone;
	
	private Date incomeTime;
	
	private String incomeTimeStr;
	
	private Date createTime;
	
	private Date updateTime;
	
	private long create_by;
	
	private long update_by;
	
	private String memberName;
	
	private String userName;
	
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	public int getIncomeType() {
		return incomeType;
	}

	public void setIncomeType(int incomeType) {
		this.incomeType = incomeType;
	}

	public int getPaymentType() {
		return paymentType;
	}

	public void setPaymentType(int paymentType) {
		this.paymentType = paymentType;
	}

	public int getPaymentChannel() {
		return paymentChannel;
	}

	public void setPaymentChannel(int paymentChannel) {
		this.paymentChannel = paymentChannel;
	}

	public double getCash() {
		return cash;
	}

	public void setCash(double cash) {
		this.cash = cash;
	}

	public String getCellphone() {
		return cellphone;
	}

	public void setCellphone(String cellphone) {
		this.cellphone = cellphone;
	}

	

	public Date getIncomeTime() {
		return incomeTime;
	}

	public void setIncomeTime(Date incomeTime) {
		this.incomeTime = incomeTime;
		if(incomeTime != null){
			String format = new SimpleDateFormat("yyyy-MM-dd").format(incomeTime);
			this.setIncomeTimeStr(format);
		}
		
	}

	public String getIncomeTimeStr() {
		return incomeTimeStr;
	}

	public void setIncomeTimeStr(String incomeTimeStr) {
		this.incomeTimeStr = incomeTimeStr;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public long getCreate_by() {
		return create_by;
	}

	public void setCreate_by(long create_by) {
		this.create_by = create_by;
	}

	public long getUpdate_by() {
		return update_by;
	}

	public void setUpdate_by(long update_by) {
		this.update_by = update_by;
	}

	
}